#!__author__ = "yf"
"""
pycharm
"""
import ddt
import unittest

@ddt.ddt
class TestDDT(unittest.TestCase):

    @classmethod
    def setUpClass(cls) -> None:
        cls.token = None

    @classmethod
    def tearDownClass(cls) -> None:
        cls.token = None

    # 元祖数据
    data1 = (1, 2, 3)
    @ddt.data(*data1)
    def test_case1(self, arg):
        print('data = (1, 2, 3) start')
        print(arg)
        self.token = 'balabala'
        print(self.token)
        print('end')

    data2 = [1, 2, 3]
    @ddt.data(data2)
    def test_case2(self, arg):
        print('data = [1, 2, 3] start')
        print(arg)
        print(self.token)
        print('end')


if __name__ == '__main__':
    unittest.main()
